﻿import QtQuick 2.0
import QtGraphicalEffects 1.0
import QtQuick.Window 2.2

/*
  阴影边框。阴影作用域当前区域，此区域作为容器加入其他可用区域
*/

Item {
    // plRectangle:整块Rectangle区域的component
    property alias plRectangle: m_loader.sourceComponent    // @require
    property var parentRef;

    anchors.fill: parent

    Rectangle {
        id: m_rect
        anchors.fill: parent
        anchors.margins: parentRef.visibility === Window.FullScreen ? 0 : 10

        color: "black"
        radius: 5

        Loader {
            id:m_loader
            anchors.fill:m_rect
            sourceComponent: undefined
        }
    }

    DropShadow {
        anchors.fill: source
        horizontalOffset: 0
        verticalOffset: 0
        //radius: ma.pressed ? 8 : 5
        radius: 5
        samples: 10
        source: m_rect
        color: "black"
        //        Behavior on radius { PropertyAnimation { duration: 100 } }
    }
}
